#pragma once

#include <gofcl_dac_r12dh.h>

typedef struct {
	dac_r12dh_mono_s r12dh_a[2];
} dac_c_r12dh_s;

_Static_assert(sizeof(dac_c_r12dh_s) == 4,
	       "Struct dac_c_r12dh_s defined error!");

static inline void dac_wreg_c_r12dh_s(dac_c_r12dh_s c_r12dh) {
	union {
		dac_c_r12dh_s r;
		u32_s u;
	} ru = {
		.r = c_r12dh,
	};
	dac_wreg_dh(DACC_DH_R, DAC_DH_R12DH_RR, ru.u);
}
